package com.tianpengtech.common.model.account;

import com.tianpengtech.common.model.AbstractBaseModel;

/**
 * 实体类名-系统用户表信息 fair_admin_account
 *
 * @since Mon Mar 06 14:53:26 HKT 2017
 */
public class Account extends AbstractBaseModel<Account> {

	/**
	 *
	 */
	private static final long serialVersionUID = 1L;
	public static final Account dao = new Account();

	public static final String ID = "id"; //
	public static final String USERNAME = "username"; // 用户名
	public static final String USERPASS = "userpass"; // 用户密码
	public static final String STATUS = "status"; // 账户状态
	public static final String MOBILE = "mobile"; // 联系方式
	public static final String CREATE_TIME = "create_time"; // 创建时间
	public static final String EMAIL = "email"; // 电子邮箱
	public static final String ROLE = "role"; // 用户角色

	public static final int STATUS_IN_USE = 1;
	public static final int STATUS_FORBIDDEN = 0;

	
	
	public String status(){
		String result="";
		if(getInt(STATUS)==STATUS_IN_USE){
			result="正常";
		}else if(getInt(STATUS)==STATUS_FORBIDDEN){
			result="禁止使用";
		}else{
			result="未知状态";
		}
		return result;
	}
	@Override
	public String tableName() {
		return "fair_admin_account";
	}

}